﻿using System;
using System.Diagnostics;

namespace Atomic.Structures
{
	/// <summary>
	/// Represents a vacant site in the structure. The symbol Vac is used as text representation (not V which is reserved for vanadium).
	/// </summary>
	[Serializable]
	[DebuggerDisplay("{Symbol}")]
	public class VacancyAtom : Atom
	{
		public override bool Equals(Atom other)
		{
			if (object.ReferenceEquals(other, null))
			{
				return false;
			}

			if (GetType() != other.GetType())
			{
				return false;
			}

			// All instances of this type are equal.
			return true;
		}

		public override int GetHashCode()
		{
			return 85752;
		}

		public override string Symbol
		{
			get
			{
				// This is the symbol ATAT uses (see "maps -h").
				return "Vac";
			}
		}

		public override int Number
		{
			get
			{
				// Not defined for this pseudo-atom.
				throw new NotSupportedException();
			}
		}

		public override double Mass
		{
			get
			{
				// Vacancies have zero masses.
				return 0.0;
			}
		}

		public override string ElectronConfiguration
		{
			get
			{
				// Not defined for this pseudo-atom.
				throw new NotImplementedException();
			}
		}
	}
}
